package org.xlh.springboot.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.xlh.springboot.service.AccountService;

@Controller
public class AccountController {

    @Autowired
    private AccountService accountService;

    @PostMapping("/transfer")
    public String transfer(String fromActNo, String toActNo, Double money) {
        accountService.transfer(fromActNo, toActNo, money);
        return "success";
    }
}
